package com.lanou.list;


import java.util.Scanner;

/**
 * @author zyj
 * @date 2022年05月19日 16:43
 */
public class StudentClassTest {
    public static void main(String[] args) {
        StudentClass clazz = new StudentClass("软件0201");
        add(clazz);

        clazz.add(new Student("250206","麻子张",34,43,23));
        System.out.println(clazz);
        Scanner sc = new Scanner(System.in);
        System.out.println("亲输入你查询的学生id");
        System.out.println(clazz.getIndexById(sc.next()));

        System.out.println("请输入你删除的学生id");
        clazz.delete(sc.next());
        System.out.println(clazz);
    }

    private static void add(StudentClass clazz){
        Student student = new Student("250201","李红",88,76,60);
        clazz.add(student);

        Student student2 = new Student("250202","张林",78,67,80);
        clazz.add(student2);

        Student student3 = new Student("250203","董玉梅",86,80,75);
        clazz.add(student3);

        Student student4 = new Student("250204","张力",70,68,75);
        clazz.add(student4);

        Student student5 = new Student("250205","何为",80,90,78);
        clazz.add(student5);
    }
}
